#include <stdio.h>
#define STOP '#'
int main(void)
{
    char c;
    int count_num = 0; 

    while ((c = getchar()) != STOP)
    {
        count_num++;
        if (count_num % 9 == 0)
            printf("\n");
        else
            printf("%c-%d ", c, c);  
    }

    return 0;
}